

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="main" />
        <title>Edit Graph</title>
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}">Home</a></span>
            <span class="menuButton"><g:link class="list" action="list">Graph List</g:link></span>
            <span class="menuButton"><g:link class="create" action="create">New Graph</g:link></span>
        </div>
        <div class="body">
            <h1>Edit Graph</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <g:hasErrors bean="${graph}">
            <div class="errors">
                <g:renderErrors bean="${graph}" as="list" />
            </div>
            </g:hasErrors>
            <g:form controller="graph" method="post" >
                <input type="hidden" name="file" value="${params?.file}" />
                <div class="dialog">
                    <table>
                        <tbody>
                            
                        <tr class="prop">
                            <th valign="top" class="name">Label</td>
                            <th valign="top" class="name">Vertex Capacity</td>
                            <th valign="top" class="name">Delivered Capacity</td>
                            <th valign="top" class="name">Induced Capacity</td>
                        </tr>
                    
                        <g:each in="${graph.vertexSet()}" status="i" var="node">
                        
                        <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
                            <td>${node.label?.encodeAsHTML()}</td>
                            <td><input type="text" id="${node.id}" name="${node.id}" value="${fieldValue(bean:node,field:'vertexCapacity')}"/></td>
                            <td>${node.deliveredCapacity?.encodeAsHTML()}</td>
                            <td>${node.inducedCapacity?.encodeAsHTML()}</td>
                        </tr>
                        
                    	</g:each>
                        
                        </tbody>
                    </table>
                </div>
                <div class="buttons">
                    <span class="button"><g:actionSubmit class="save" value="Update" /></span>
                    <span class="button"><g:actionSubmit class="save" value="Export" /></span>
                </div>
            </g:form>
        </div>
    </body>
</html>
